package com.funo.wcity.app.service.mail.send;

import java.util.Date;
import java.util.Map;
import java.util.Properties;

/**  
* 发送邮件需要使用的基本信息  
*/  
public class MailBean {
	private String mailServerPort = "25";
	// 邮件发送者的地址
	private String fromAddress;
	// 邮件接收者的地址
	private String toAddress;
	//抄送人
	private String toCc;
	//密送人
	private String toBcc;
	// 登陆邮件发送服务器的用户名
	private String userName;
	// 登陆邮件发送服务器的密码
	private String password;
	// 是否需要身份验证
	private boolean validate = false;
	// 邮件主题
	private String subject;
	// 邮件的文本内容
	private String content;
	// 邮件附件的文件名
	private String fileNames;
	//邮件嵌入式文件
	private Map resources;
	//邮件Pop与Pop3协议
	private String pop;
	//邮件imap协议
	private String imap;
	//邮件smtp协议
	private String smtp;
	//邮件发送时间
	private Date mailDate;
	//邮件id
	private String messageId;
	//邮件UID
	private Long messageUid;
    //邮件大小
	private Integer mailSize;
	//标识
	private String flags;
	//发送发邮件ID地址
	private String mailIp;
	/**
	 * 获得邮件会话属性
	 */
	public Properties getProperties() {
		Properties p = new Properties();
		p.put("mail.smtp.host", this.smtp);
		p.put("mail.smtp.port", this.mailServerPort);
		p.put("mail.smtp.auth", validate ? "true" : "false");
		return p;
	}
	public String getFileNames() {
		return fileNames;
	}

	public void setFileNames(String fileNames) {
		this.fileNames = fileNames;
	}

	public String getMailServerPort() {
		return mailServerPort;
	}

	public void setMailServerPort(String mailServerPort) {
		this.mailServerPort = mailServerPort;
	}

	public String getFromAddress() {
		return fromAddress;
	}

	public void setFromAddress(String fromAddress) {
		this.fromAddress = fromAddress;
	}

	public String getToAddress() {
		return toAddress;
	}

	public void setToAddress(String toAddress) {
		this.toAddress = toAddress;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public boolean isValidate() {
		return validate;
	}

	public void setValidate(boolean validate) {
		this.validate = validate;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	public String getToCc() {
		return toCc;
	}

	public void setToCc(String toCc) {
		this.toCc = toCc;
	}

	public String getToBcc() {
		return toBcc;
	}

	public void setToBcc(String toBcc) {
		this.toBcc = toBcc;
	}

	public Map getResources() {
		return resources;
	}

	public String getPop() {
		return pop;
	}

	public void setPop(String pop) {
		this.pop = pop;
	}

	public String getImap() {
		return imap;
	}

	public void setImap(String imap) {
		this.imap = imap;
	}

	public String getSmtp() {
		return smtp;
	}

	public void setSmtp(String smtp) {
		this.smtp = smtp;
	}

	public void setResources(Map resources) {
		this.resources = resources;
	}

	public Date getMailDate() {
		return mailDate;
	}

	public void setMailDate(Date mailDate) {
		this.mailDate = mailDate;
	}
	public String getMessageId() {
		return messageId;
	}
	public void setMessageId(String messageId) {
		this.messageId = messageId;
	}
	public Integer getMailSize() {
		return mailSize;
	}
	public void setMailSize(Integer mailSize) {
		this.mailSize = mailSize;
	}
	public Long getMessageUid() {
		return messageUid;
	}
	public void setMessageUid(Long messageUid) {
		this.messageUid = messageUid;
	}
	public String getFlags() {
		return flags;
	}
	public void setFlags(String flags) {
		this.flags = flags;
	}
	public String getMailIp() {
		return mailIp;
	}
	public void setMailIp(String mailIp) {
		this.mailIp = mailIp;
	}
}
